//
//  LHHomeTitleButton.swift
//  sinaWeibo
//
//  Created by LiHong on 15/10/31.
//  Copyright © 2015年 LiHong. All rights reserved.
//

import UIKit

class LHHomeTitleButton: UIButton {
    
    convenience init(title: String){
        self.init()
        
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        sizeToFit()
    }
    
    
    override func layoutSubviews() {
        super.layoutSubviews()
        titleLabel?.frame.origin.x = 0
        imageView?.frame.origin.x = (titleLabel?.frame.size.width)! + 3
    }
    
}
